import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.NotBoundException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.io.File;

public interface NodoInterface extends Remote{
    /**
     * Method that returns an array list containing all the tracks that match the
     * consult specified
     *
     * @param req Request object containing the specifications of the request
     * @param visited A List containing all the nodes that have already been consulted
     *
     * @return A List containing all the tracks that match the consult
     *
     * @throws RemoteException Standard exception for RMI.
     */
    public ArrayList<Track> consult(Request req)
        throws RemoteException, HostException;

    /**
     * Method that returns a track specified for downloading
     *
     * @param req Request object containing the specifications of the track to download
     *
     * @return A remote readonly File containing the requested track
     *
     * @throws RemoteException Standard exception for RMI.
     */
    public File download(Request req)
        throws RemoteException;

    /**
     * Method used to obtain all nodes that are reachable from this node
     *
     * @param visited An ArrayList containing the names of all the nodes that have been visited already
     *
     * @return An ArrayList containing all the nodes rachable from this
     */
    public ArrayList<String> getReachables(ArrayList<String> nodes)
        throws RemoteException, HostException;
}